package com.runen.infinitemovement.tool;

import android.app.Activity;
import android.content.Intent;

import com.runen.infinitemovement.activity.IntroduceActivity;
import com.runen.infinitemovement.activity.IntroduceWeLoadActivity;
import com.runen.infinitemovement.activity.MainActivity;
import com.runen.infinitemovement.activity.WeTheLongMarchRoadActivity;
import com.runen.infinitemovement.model.enums.SPCompat;
import com.runen.rxnetlibrary.utils.SharePreferenceUtils;

/**
 * Create by LiaoDuanHong
 * Create on
 */
public class AppUtils {
    public static void jumpToMain(Activity activity) {
        boolean firstStartApp = SharePreferenceUtils.getBoolean(activity, SPCompat.FIRST_START_APP, true);
        if (firstStartApp) {
            activity.startActivity(new Intent(activity, IntroduceActivity.class));
        } else
            activity.startActivity(new Intent(activity, MainActivity.class));
        activity.finish();
    }
}
